package com.rymcu.subject;

public class DemoMemory {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        System.err.println("虚拟机可用空间"+runtime.totalMemory());
        System.err.println("虚拟机空余空间"+runtime.freeMemory());
        Integer[] arr = new Integer[199];
        System.err.println("虚拟机空余空间"+runtime.freeMemory());
    }
}
